 *-=*=-=-=*=-=-=*=-=-=*=-=-=*=-=-=*=-=-=*=-=-=*=-=-=*=-=-=*=-*
 +                                                           +
 *          Constructing Tables for NES ROM Hacking          *
 +                                                           +
 *                           v1.2                            *
 +                                                           +
 *                        by InVerse                         *
 +                                                           +
 *                         04/13/99                          *
 +                                                           +
 *-=*=-=-=*=-=-=*=-=-=*=-=-=*=-=-=*=-=-=*=-=-=*=-=-=*=-=-=*=-*


 Introduction
 ~~~~~~~~~~~~
      The purpose of this document is simple enough, to teach 
 people who are new to ROM hacking/translating how to create
 tables for use with NES ROMs. If you're experienced with such
 things then there's no reason for you to read this, but I've
 had several people as of late coming into various channels on
 IRC and asking for help creating tables, so I decided to write
 my own file on the subject. I don't claim to have created any 
 of the techniques in this file, I'm simply relaying the info 
 to those who need it.
 
 
 Disclaimer
 ~~~~~~~~~~
      If the techniques in this file fail to work for any 
 reason, I will refund all of your money. Since this is a free
 file, I guess that means you won't be getting much back. ; )
 If the techniques DO work, then do everyone a favor and make 
 a good hack or translate a good game. ; )
 
      
 Tools
 ~~~~~
 Nesticle
 NES ROM
 Notepad
 (Yup, that's it, though a computer can help too.)


 Getting Started
 ~~~~~~~~~~~~~~~
      Alright, first you have to open the ROM you want to create
 a  table for in Nesticle. For the purposes of this lesson, I'm 
 going to use The Legend of Zelda so if you want to follow 
 along, I suggest using that ROM as well.
      Once you have the ROM opened, pause it by pressing ALT-P.
 Hit F2 and you'll see Nesticle's Pattern Editor pop up. Now 
 you have to locate the font table. See the alphabet and numbers
 up in the upper left hand corner of the Pattern Editor? That's
 the font table. In some ROMs, it won't be quite so easy to 
 find. Sometimes you'll have to let the game run for a little 
 bit before the font table will pop up, sometimes (especially 
 in older games) there might not be a complete font table. 
 Other times, there might even be more than one font table. But
 for the most part, you'll get lucky (like we did with Zelda) 
 and the complete font table will be located at the beginning.

 Anywayz, once you've located the font table, click the first 
 character that you want to include. A small window will pop up
 that has the character in it. At the top of that window, you'll
 see the hex address of that particular character in the ROM. 
 Now either type the character and coordinate into notepad or 
 (if you don't want to bounce back and forth between Nesticle 
 and Notepad) write it down on a sheet of paper. Once you have
 the hex address of all characters (don't forget the punctuation
 marks) it's time to make the table.
 
 
 Creating a Table
 ~~~~~~~~~~~~~~~~
      When this file was first written, there were two different
 types of tables, but with the release of Hexposure .40, SnowBro
 has converted Hexposure to use the same format as Thingy. So now 
 that you have all the information you need to actually create a 
 table, lets get started.
      To make a table, you simply type the hexadecimal value of
 the character followed by an equal (=) sign and the character
 itself. So, using the earlier example of The Legend of Zelda
 where the hex value of A is 0A, you simply type the following:

                     0A=A

 Do this for all characters you wish to include in your table 
 and then save the file as <game>.tbl where <game> is identical
 to the name of your ROM. So if you're using zelda.nes then the
 table would be named zelda.tbl. If you don't want to name the
 table the same as the ROM, it will still work, but Hexposure
 will open a table by default if it shares the name of the ROM.
 It'll save you a few seconds of work of you make the ROM and 
 table names match.

 
 Other than that, the only major feature is that you can have
 more than one value per line so that you can list hex values of
 entire words, etc. This is mainly for use with DTE (Dual Tile
 Encoding). If you don't know what DTE is, well, that's a bit
 more advanced than anything I intend to cover here, so you'll
 have to get a document on higher level ROM hacking. For now,
 though, stick to the basics. Here's an example from Zelda even
 though there's really no need to use the technique for such a
 simple game:

                 230E150D0A=ZELDA


 Sample Table
 ~~~~~~~~~~~~
      Here is a sample table from The Legend of Zelda. Feel free
 to cut and paste if you want, but I'd suggest attempting to make
 your own and then comparing it to this one to see if you did it
 correctly.

 ----
 00=0
 01=1
 02=2
 03=3
 04=4
 05=5
 06=6
 07=7
 08=8
 09=9
 0A=A
 0B=B
 0C=C
 0D=D
 0E=E
 0F=F
 10=G
 11=H
 12=I
 13=J
 14=K
 15=L
 16=M
 17=N
 18=O
 19=P
 1A=Q
 1B=R
 1C=S
 1D=T
 1E=U
 1F=V
 20=W
 21=X
 22=Y
 23=Z
 28=,
 29=!
 2A='
 2B=&
 2C=.
 2D="
 2E=?
 2F=-
 -----
 (Remember, the  ---- is a divider, don't include it in your table!)

 Conclusion
 ~~~~~~~~~~
      So that ends our little tutorial on creating table files.
 If you haven't grasped the concept yet then you're most likely
 not going to get very far in the ROM hacking/translation scene.
 
 If you still don't understand how to hack/translate ROMs, well,
 that's to be expected. This document wasn't intended to teach
 you how to hack/translate, it only explains one of the most
 basic techniques required to get started. Go read other 
 documents (especially the README files of the utilities) and
 ask questions on IRC/WWWBoards. Zophar's Domain (www.zophar.net)
 hosts a ROM hacking board and #romhack on IRC's EFnet is 
 another good place. Just expect to be flamed at either place 
 because the ratio of idiots to intelligent people is about 5:1.

 Anywayz, that ends this document. Hopefully it helped somebody
 out. If you believe there are mistakes in the file, please let
 me know. Don't e-mail me asking about more advanced topics,
 though, because I won't answer. There are plenty of documents
 out covering almost all hacking/translating subjects, so you
 should be able to figure out whatever problem your having.

 Special Thanks
 ~~~~~~~~~~~~~~
      The following people either somehow contributed to this
 document or I just feel like thanking because they're elite or
 something. ; )

 SnowBro - author of Hexposure and other great programs.
           (http://home.sol.no/~kenhanse/nes/index.htm)

 Necrosaro - author of Thingy.
             (http://members.aol.com/sabindude/)

 Patrikus - for originally teaching me how to make .tbl files. 

 Chojin - for being one of the few people in the emu scene that
          I don't want to sodomize with a pool cue.

 _Bnu - for being the only other person in the emu scene that
        I don't want to sodomize with a pool cue.

 Taskforce - for bringing me out of a homicidal mood today by
             sending me the Sanrio Time Net Future ROM.

 Lina`chan - Cuz I know she'll whine if I don't put her in
             this document somewhere. ; ) j/k

 History
 ~~~~~~~ 
 01/11/99 - v1.0 - Initial Release
 04/13/99 - v1.5 - Updated for Hexposure .40, Contact Info


 Contact Info
 ~~~~~~~~~~~~
      I'm not that great of a ROM hacker. I wrote this document
 because I'm sick of seeing people constantly asking how to make
 table files, so now I can send this to them instead of having
 to explain it over and over again. In other words, if you have
 questions about ROM hacking, don't e-mail them to me. If you
 find a problem with this document, though, please e-mail me at
 inverse@pigtails.net and I'll be sure to correct it.

 The most recent copy of this file can always be found at my
 website Suicidal Translations (http://www.pigtails.net/ST)
 -InVerse